package com.docchatlink.constant;

import lombok.Getter;

/**
 * <p>
 * 文件总结状态
 * </p>
 *
 * @author Mr.piggy
 * @since 2024/3/27
 */
@Getter
public enum ExpirationStatusCodeEnum {

    ACTIVE("active", "正常"),
    EXPIRED("expired", "已过期"),
    ;

    private String code;

    private String desc;

    ExpirationStatusCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }


    public static ExpirationStatusCodeEnum findByCode(String code) {
        for (ExpirationStatusCodeEnum statusEnum : ExpirationStatusCodeEnum.values()) {
            if (statusEnum.getCode().equals(code)) {
                return statusEnum;
            }
        }
        return null;
    }
}
